/*
	File:		IInput.h
	Author:		dmonroe, Arturo Mata
	Date:		11/10/2012
	Copyright:	Full Sail University

	Purpose:	Interface class for input implementations
*/

#ifndef IINPUT_H
#define IINPUT_H


class IInput
{
public:
	// SINGLETON
	static IInput*		GetInstance		( void );
	static void			DeleteInstance	( void );

	// SETUP
	virtual	bool		Initialize		( void )	= 0;
	virtual	bool		Terminate		( void )	= 0;
	
	// FRAME UPDATE
	virtual bool		Update			( void )	= 0;


	// TODO: Input accessors
	enum EButton	{	E_DPAD_UP, E_DPAD_DOWN, E_DPAD_LEFT, E_DPAD_RIGHT,
						E_FACE_UP, E_FACE_DOWN, E_FACE_LEFT, E_FACE_RIGHT,
						E_LEFT_SHOULDER, E_RIGHT_SHOULDER, E_LEFT_THUMB, E_RIGHT_THUMB,
						E_START, E_SELECT, E_NUM_BUTTONS
	};

	enum EBatteryStatus { E_EMPTY, E_LOW, E_MEDIUM, E_FULL };

	virtual void		SetInputStatus			( bool _bEnable ) = 0;
	virtual bool		ConnectionStatus		( int _nControllerID = 0 ) = 0;
	virtual bool		ButtonPressed			( EButton _eButton, int _nControllerID = 0 ) = 0;
	virtual bool		IsButtonDown			( EButton _eButton, int _nControllerID = 0 ) = 0;
	virtual bool		IsButtonUp				( EButton _eButton, int _nControllerID = 0 ) = 0;
	virtual float		LStickX					( int _nControllerID = 0 ) = 0;
	virtual float		LStickY					( int _nControllerID = 0 ) = 0;
	virtual float		RStickX					( int _nControllerID = 0 ) = 0;
	virtual float		RStickY					( int _nControllerID = 0 ) = 0;
	virtual int			LTrigger				( int _nControllerID = 0 ) = 0;
	virtual int			RTrigger				( int _nControllerID = 0 ) = 0;
	virtual void		Rumble					( unsigned short _LeftMotor, unsigned short _RightMotor, int _nControllerID = 0 ) = 0;
	virtual int			BatteryStatus			( int _nControllerID = 0 ) = 0;

protected:
	IInput				( void )				// Default constructor
		{	/* do nothing*/		}
	virtual	~IInput		( void )				// Destructor
		{	/* do nothing*/		}

private:
	IInput				( const IInput& );		// Copy constructor
	IInput&	operator=	( const IInput& );		// Assignment operator

};

#endif //IINPUT_H
